<div style=";background-color: #f5f5f5;width: 100%;height: 35px">
    <div class="container">
        <div style="text-align:left;margin-top: 5px;float: left">
            <?php if(isset($_SESSION['name'])): ?>
            <!-- 这里是登录显示用户名代码 -->
            欢迎您：
            <div class="btn-group">
                <button type="button" class="btn btn-default  " data-toggle="dropdown">
                    <?php echo $_SESSION['name'] ?><span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li><a id="close">退出</a></li>
                </ul>
            </div>
            <?php else: ?>
            <!-- 这里是未登录显示登录与注册 -->
            请登录......
            <!--<a href="#" data-toggle="modal" id='dl'>-->
            <!--登陆-->
            <!--</a>-->
            <a href="{:U('login')}">
                登陆
            </a> |
            <!--<a href="{:U('register')}">-->
                <!--注册</a>-->
            <a href="#/reg1">货主注册</a>|
            <a href="#/reg2">车主注册</a>|
            <!--<a href="{:U('Jifen/index')}">jifen</a>-->
            <!--<a href="{:U('PlatServer/platserv')}">plat</a>-->
            <?php endif; ?>
        </div>
        <div style="float:right;margin-top: 5px;margin-left: 5px"><a href="http://www.qiantai56.com" style="color: grey">|企业官网</a></div>
        <div style="text-align: right;float:right;margin-top: 5px">
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3095513137&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:3095513137:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
        </div>

    </div>
</div>
<div class="main-header">
    <div class="container">
        <div class="row">
            <div class="col-md-4" style="padding: 0; margin: 0;">
                <a href="" class="branding" title="56zhipei">
                    <img src="__IMG__/logo.jpg">

                    <h2 class="text-hide">
                        现在您访问的是56智配网
                    </h2>
                </a>
            </div>
            <div class="col-md-8">
                <form class="navbar-form navbar-right" rel="search">
                    <div style="text-align: right;">
                        <!--<div class="main-im" style="float: right">-->

                        <!--</div>-->
                        <div style="padding-top: 20px;">
                            <img src="__IMG__/icon-2.png" width="45px" style="float: left;margin-right: 20px">

                            <div class="title-z" style="font-size:18px;color: darkgrey;font-weight:bold;float: left;">
                                400-656-6756
                            </div>
                            <div class="title-c" style='color: darkgrey;text-align: center;'>全国咨询热线</div>
                        </div>
                        <!--<?php if(isset($_SESSION['name'])): ?>-->
                        <!--&lt;!&ndash; 这里是登录显示用户名代码 &ndash;&gt;-->
                        <!--欢迎您：-->
                        <!--<div class="btn-group">-->
                        <!--<button type="button" class="btn btn-default  " data-toggle="dropdown">-->
                        <!--<?php echo $_SESSION['name'] ?><span class="caret"></span>-->
                        <!--</button>-->
                        <!--<ul class="dropdown-menu">-->
                        <!--<li><a id="close">退出</a></li>-->
                        <!--</ul>-->
                        <!--</div>-->
                        <!--<?php else: ?>-->
                        <!--&lt;!&ndash; 这里是未登录显示登录与注册 &ndash;&gt;-->
                        <!--请登录......-->
                        <!--<a href="#" data-toggle="modal" id='dl'>-->
                        <!--登陆-->
                        <!--</a> |-->
                        <!--<a href="#" data-toggle="modal" data-target=".Registered">-->
                        <!--注册</a>-->
                        <!--<?php endif; ?>-->
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<!--找回密码-->
<div class="modal fade zhaohuimima" tabindex="-1" role="dialog" aria-labelledby="examplemodallabel" aria-hidden="true"
     id="zhaohuimima">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="close">
                    <span aira-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">找回密码</h4>
            </div>
            <div class="modal-body">

                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">手机号</label>

                        <div class="col-md-8">
                            <input id='tel' name='tel' type="tel" class="form-control" placeholder="手机号码">
                        </div>
                        <div class="col-md-3"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label sr-only">Ver</label>

                        <div class="col-md-6">
                            <input type="text" name="code" id='code' class="form-control" placeholder="验证码">
                        </div>
                        <div class="col-md-4">
                            <button type="button" class="btn btn-default" onclick="getVer()">获取验证码</button>
                        </div>
                    </div>
                    <div class="form-group">

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-success" onclick="validVer()">找回密码</button>

                    </div>
                </form>
            </div>

        </div>
    </div>
</div>

<script>
    //退出
    $('#close').click(function () {
//                alert('nihao');
                $.post(
                        '{:U("Index/close")}',
                        function () {
                            window.location.href = '{:U("Index/index")}';
                        }
                )
            }

//
    )

    $('#dl').click(function () {
        var id = "<?php echo $_SESSION['name']?>"
        if (id != "" && id != null) {
            $('#tip_body').text('你已经登陆，不能重新登陆');
            $('#tip').modal('show');
            setTimeout(function () {
                $('#tip').modal('hide')
            }, 500);
        } else {
            $(".login").modal('show');
        }

    })
    function reg() {
        $.post(
                '{:U("Index/reg")}',
                $("#reg").serialize(),
                function (data) {
                    console.log(data.result);
                    if (data.result == 'success') {
                        $('.Registered').modal('hide');
//                        alert('注册成功');
                        $('#tip_body').text('注册成功');
                        $('#tip').modal('show');
                        setTimeout(function () {
                            $('#tip').modal('hide')
                        }, 1000);
                    } else if (data.result == 'error') {
                        $('#tip_body').text(data.describe);
                        $('#tip').modal('show');
                        setTimeout(function () {
                            $('#tip').modal('hide')
                        }, 1000);
                    }
                },
                'json'
        );
    }


    function getVer() {
        $.post(
                '/Index/Ver',
                {
                    mobile: $('#tel').val()
                }
        )
    }

    function validVer() {
        $.post(
                '/Index/valid',
                {
                    mobile: $('#tel').val(),
                    code: $('#code').val()
                },
                function (data, status) {
                    alert(data + "," + status)
                }
        )
    }
</script>

<style>
    .btn-default {
        background-color: #ffffff;
        border-color: #ffffff;
        color: #000000;
    }
    .main-navigation .menu li a {
        color: #ffffff;
        line-height: 4em;
        display: block;
        padding: 0 21px;
    }
</style>

<nav class="navbar navbar-default navbar-fixed-top" style="background: #337ab7">
    <div class="container">
        <div class="row">
            <!--<div class="col-md-12">-->
                <!--<div class="navbar-header">-->
							<!--<span class="nav-toggle-button collapse" data-target="#main-menu">-->
								<!--<span class="sr-only">toggle navigation</span>-->
							<!--<i class="fa fa-bars"></i>-->
							<!--</span>-->
                </div>
                <div class="collapse navbar-collapse" id="main-menu">
                    <ul id="nav" class="menu">
                        <li role="presentation" id="index" class="nav-current">
                            <a href="#/index">
                                首页</a>
                        </li>
                        <li role="presentation" id="goodinfo">
                            <a href="#/goodinfo">货源信息</a>
                        </li>
                        <li role="presentation" id="carinfo">
                            <a href="#/carinfo">车源信息</a>
                        </li>
                        <li role="presentation" id="center">
                            <a id='vipcenter'>会员中心</a>
                        </li>
                        <!--<li role="presentation"<eq name = 'ACTION_NAME' value="goodcenter">class="nav-current"</eq>>-->
                        <!--<a id = 'good'>货主中心 </a>-->
                        <!--</li>-->
                        <!--<li role="presentation"<eq name = 'ACTION_NAME' value="carcenter">class="nav-current"</eq>>-->
                        <!--<a id = 'car'>车主中心 </a>-->
                        <!--</li>-->
                        <li role="presentation" id="platformService">
                            <a href="#/platformService">平台服务</a>
                        </li>
                        <li role="presentation" id="platformResource">
                            <a href="#/platformResource">平台资源</a>
                        </li>
                    </ul>
                </div>

            <!--</div>-->
        </div>
    </div>
</nav>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Brand</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
                <li><a href="#">Link</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">One more separated link</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left" role="search">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Link</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

